Skip to content

pkgs/id: clear the two allowed 1.99 clippy lints in id-core/id-caps/id-config/id-render (#803 slice) - #14452

Merged
developing-today-fleet[bot] merged 6 commits into
mainfrom
felix/803-clippy-sweep
Nov 24, 2026
Merged

developing-today-fleet[bot] merged 6 commits into
mainfrom
felix/803-clippy-sweep

Conversation

@dezren39

@dezren39 dezren39 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

#803 slice: clear the two allowed Rust 1.99 lints in id-core / id-caps / id-config / id-render

First slice of the P8.8 clippy sweep. #803's acceptance criteria name exactly two lints that were allow-listed with TODO(P8.8) comments across the pkgs/id lint tables: clippy::assert_is_empty and clippy::chunks_exact_to_as_chunks. This PR fixes every site of both lints that could be enumerated, in the crates whose targets compile under clippy, and removes the allows from those crates' tables.

What changed

  • 96 assert_is_empty sites converted to assert_eq! / assert_ne! against the empty value clippy itself suggests: id-render 15 (tests), id-caps 26, id-core 55 (src + tests).
  • 5 chunks_exact_to_as_chunks sites converted to as_chunks (all id-core: id_shape, id_uri_parse, sanctions_store, transport_advertisement hex decoding + graph_term_codec test).
  • Allows + TODO(P8.8) comments removed from the id-core, id-caps, and id-config [lints.clippy] tables. (id-render never had them.)
  • Clippy's suggestions render crate-internal types as bare module paths (world_manifest::ApplyStep, abuse::BudgetLimit, ...) that do not resolve from inside those modules' own test code; 31 sites are qualified with crate:: instead, and one empty comparison in id_uri is annotated [String; 0] (E0282 on the bare [] form). No blanket #[allow] added anywhere.
  • Formatting of the converted assertions matches cargo fmt output for every touched file.

Verification (all remote, fleet-command runs on developing-today/fleet)

  • Run 45422663419: cargo clippy --all-targets --all-features --keep-going --message-format=json over pkgs/id → 0 diagnostics for both lints. Remaining compile failures are exactly the pre-existing ones from main: id-caps (lib test) 18 errors and id-store (lib) 8 errors — the deny-level lint/error class tracked separately on main-broken: developing-today/code id e2e nightly (run 45247507279) — nix flake check (full) fails on Magic Nix Cache rate limit #13843 (under plain cargo test, id-caps compiles clean; verified on main in run 45417226856).
  • Run 45419399131: cargo test -p id-core -p id-caps -p id-render -p id-config → all suites pass, 0 failed (id-caps lib 286 passed; id-core lib 587 passed + 1 ignored; all integration suites ok).
  • Run 45426692293: cargo fmt --all -- --check → no diffs in any file this PR touches (pre-existing fmt drift in untouched files, e.g. screen_codec.rs, benches/world_bench.rs, id-import-notion, id-worlds, exists on main too and is left alone); test-target build of the four crates: 0 errors.
  • Site census was taken with the allows overridden (-W on both lints), run 45403884689: 99 assert sites + 5 chunks sites existed workspace-wide; the 3 remaining assert sites are in id-import-notion, which has no [lints.clippy] table and does not enable these lints.

Not in this PR

Left unmerged for Felix's review.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

felix added 6 commits November 24, 2026 13:57
….8 allows in id-core/id-caps/id-config (#803)

First slice of the P8.8 sweep. The 15 firing sites in id-render's
integration tests now use assert_eq!/assert_ne! per clippy's own
suggestions. The assert_is_empty and chunks_exact_to_as_chunks allows
(and their TODO(P8.8) comment) are removed from the id-core, id-caps
and id-config lint tables so the branch verification enumerates every
remaining site in those crates; further site fixes follow in this PR.
The remaining tables stay allowed until the crates blocked behind
#13843's error-level failures lint again (recorded on #803).
…tes in id-core/id-caps (#803)

81 assert sites converted to assert_eq!/assert_ne! with clippy's own
suggested empty values (verified per-site against the override probe,
fleet run 45403884689), and 5 chunks_exact call sites converted to
as_chunks (id_shape, id_uri_parse, sanctions_store,
transport_advertisement hex decoders + graph_term_codec test).
Together with the id-render fixes this clears both 1.99 lints in
every crate whose lint tables are un-allowed in this PR and whose
targets compile; id-store's lib and id-caps' lib-test remain blocked
by the pre-existing error-level failures tracked on #13843.
…e:: (#803)

Clippy's assert_is_empty suggestions render crate-internal types as
bare module paths (abuse::BudgetLimit, membership::AuthId, ...) that
do not resolve from inside the modules' own test code; prefix them
with crate::. Also annotate the id_uri segments() empty comparison
as [String; 0] (E0282 on the bare [] form).
…e:: (#803)

Same fix as id-core: world_manifest::ApplyStep, declaration::
DeclarationCard, library_manifest::PlatformRequirement, role_config::
RoleGrant and cap_notice::NoticeLine do not resolve from inside the
modules' own test code (21 E0433 in the lib test under --all-features).
Wrap the assert_eq!/assert_ne! conversions whose single-line form
exceeds the width rustfmt accepts for these macro calls, matching
rustfmt's own output (verified against cargo fmt --check on the
fleet runner; pre-existing fmt drift in untouched files such as
screen_codec.rs and benches/world_bench.rs is left alone).
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 004a237c-f57f-403e-bb59-91a346ae2cad
Commits

Reviewing files that changed from the base of the PR and between 30e943e and 407cbe6.

Files selected for processing: 34

  • pkgs/id/crates/id-caps/Cargo.toml
  • pkgs/id/crates/id-caps/src/cap_notice.rs
  • pkgs/id/crates/id-caps/src/declaration.rs
  • pkgs/id/crates/id-caps/src/library_attach.rs
  • pkgs/id/crates/id-caps/src/library_manifest.rs
  • pkgs/id/crates/id-caps/src/library_resolution.rs
  • pkgs/id/crates/id-caps/src/role_config.rs
  • pkgs/id/crates/id-caps/src/world_caps.rs
  • pkgs/id/crates/id-caps/src/world_manifest.rs
  • pkgs/id/crates/id-config/Cargo.toml
  • pkgs/id/crates/id-core/Cargo.toml
  • pkgs/id/crates/id-core/src/abuse.rs
  • pkgs/id/crates/id-core/src/access.rs
  • pkgs/id/crates/id-core/src/append_list.rs
  • pkgs/id/crates/id-core/src/id_shape.rs
  • pkgs/id/crates/id-core/src/id_uri.rs
  • pkgs/id/crates/id-core/src/id_uri_parse.rs
  • pkgs/id/crates/id-core/src/membership/layer.rs
  • pkgs/id/crates/id-core/src/sanctions.rs
  • pkgs/id/crates/id-core/src/sanctions_store.rs
  • pkgs/id/crates/id-core/src/transport_advertisement.rs
  • pkgs/id/crates/id-core/src/tuple.rs
  • pkgs/id/crates/id-core/src/waiting.rs
  • pkgs/id/crates/id-core/tests/cross_signing_challenge.rs
  • pkgs/id/crates/id-core/tests/delegation_model.rs
  • pkgs/id/crates/id-core/tests/graph_term_codec.rs
  • pkgs/id/crates/id-core/tests/social_graph_traversal.rs
  • pkgs/id/crates/id-core/tests/stream_lifecycle_model.rs
  • pkgs/id/crates/id-core/tests/succeeds_dag.rs
  • pkgs/id/crates/id-core/tests/swarm_bench.rs
  • pkgs/id/crates/id-render/tests/compose.rs
  • pkgs/id/crates/id-render/tests/lower.rs
  • pkgs/id/crates/id-render/tests/lower_gui.rs
  • pkgs/id/crates/id-render/tests/lower_native.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet
developing-today-fleet Bot merged commit ac02dd2 into main Nov 24, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/803-clippy-sweep branch November 24, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant